/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.pconline.activity.domain;

import cn.pconline.activity.repository.GenericRepository;
import cn.pconline.activity.util.EnvUtils;
import java.util.Date;

/**
 *
 * @author zhangfan
 */
public class User {

    private long userId;    //userId
    private String accountName;
    private int status;
    private String ip;
    private Date createAt;
    private Date updateAt;
    private String email;
    transient public static final User EMPTY_USER = new User();

    public Date getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public static User find(long id) {
        return EnvUtils.getEnv().getBean(GenericRepository.class).find(id, User.class);
    }
}
